/**
 * 
 */
package com.storm.lib.bean;

import java.util.List;

/**
 * 类功能: 行数据
 * @author johnny
 * @version 2010-10-27
 */
public class DataRowBean {
	/**
	 * 代表起始数据的行数（不是excel的行数），数据从1开始
	 */
	private int dataRowIndex;
	/**
	 * 数据集合
	 */
	private List<DataCellBean> DataCellList;
	/**
	 * @return the dataRowIndex
	 */
	public int getDataRowIndex() {
		return dataRowIndex;
	}
	/**
	 * @param dataRowIndex the dataRowIndex to set
	 */
	public void setDataRowIndex(int dataRowIndex) {
		this.dataRowIndex = dataRowIndex;
	}
	/**
	 * @return the dataCellList
	 */
	public List<DataCellBean> getDataCellList() {
		return DataCellList;
	}
	/**
	 * @param dataCellList the dataCellList to set
	 */
	public void setDataCellList(List<DataCellBean> dataCellList) {
		DataCellList = dataCellList;
	}
	/**
	 * 方法功能:得到拼装过的注释
	 * 更新时间:2010-10-28, 作者:johnny
	 * @param dataRowBean
	 * @return
	 */
	public String getCommentByDataRowBean() {
			String description=(String)getDataCellList().get(5).getData();
			String note=(String)getDataCellList().get(6).getData();
			String calculateWay=(String)getDataCellList().get(7).getData();
			Integer readLevel = (Integer)getDataCellList().get(8).getData();
			Integer writeLevel = (Integer)getDataCellList().get(9).getData();
			if(description==null){
				description="";
			}
			String comment="描述:"+description;
			if(note!=null){
				comment+=",备注:"+note;
			}
			if(calculateWay!=null){
				comment+=",计算方式:"+calculateWay;
			}				
			if(readLevel!=null){
				comment+=",读频率:"+readLevel;
			}			
			if(writeLevel!=null){
				comment+=",写频率:"+writeLevel;
			}	
			return comment;
	}
	
	
}
